﻿
@{
    Layout = null;
}
@using System.Data;
<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>预约后台系统管理 - </title>
    <!-- Bootstrap Styles-->
    <link href="~/assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FontAwesome Styles-->
    <link href="~/assets/css/font-awesome.css" rel="stylesheet" />
    <!-- Morris Chart Styles-->
    <link href="~/assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
    <!-- Custom Styles-->
    <link href="~/assets/css/custom-styles.css" rel="stylesheet" />
    <!-- Google Fonts-->
    <link href="~/assets/css/font.css" rel='stylesheet' type='text/css' />
    <link rel="stylesheet" href="~/assets/basic/base.css" />

    <link rel="stylesheet" href="~/assets/css/calendar.min.css" />
    <script src="~/assets/js/jquery-1.10.2.js"></script>
    <script src="~/assets/js/bootstrap.min.js"></script>
    <script src="~/assets/js/calendar.min.js"></script>
    @*<script src="~/assets/js/calendar.min.js"></script>*@


</head>
<body>
    <div id="wrapper">
        <nav class="navbar navbar-default top-navbar" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html"><i class="fa fa-comments"></i> <strong>预约管理 </strong></a>
            </div>



        </nav>
        <!--/. NAV TOP  -->
        <nav class="navbar-default navbar-side" role="navigation">
            <div id="sideNav" href=""><i class="fa fa-caret-right"></i></div>
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">

                    <li>
                        <a class="active-menu" href="Manage"><i class="fa fa-dashboard"></i> 预约管理</a>
                    </li>
                    <li>
                        <a class="active-menu" href="AddBath"><i class="fa fa-dashboard"></i> 添加澡堂</a>
                    </li>
                    <li>
                        <a class="active-menu" href="BookList"><i class="fa fa-dashboard"></i> 预约查看</a>
                    </li>
                </ul>

            </div>

        </nav>
        <div id="page-wrapper">
            <div id="page-inner">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            新建项目
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                    <form role="form">

                                        <div class="form-group">
                                            <label>项目名称</label>
                                            @*<input class="form-control" id="projectName" placeholder="项目名称">*@
                                            <select class="form-control" id="projectName">
                                                @{
                                                    DataTable dt = ViewBag.Bath as DataTable;
                                                    for (int i = 0; i < dt.Rows.Count; i++)
                                                    {
                                                        <option value="@dt.Rows[i]["BathId"]">@dt.Rows[i]["BathName"]</option>
                                                    }
                                                }


                                            </select>
                                        </div>
                                        <div class="form-group" id='datetimepicker2'>
                                            <label>开始时间</label>
                                            <input type="text" id="startTime" placeholder="开始时间" class=" form-control select-text" />
                                        </div>
                                        <div class="form-group" id='datetimepicker2'>
                                            <label>结束时间</label>
                                            <input type="text" id="endTime" placeholder="结束时间" class="form-control select-text" />
                                        </div>
                                        <div class="form-group" id='datetimepicker2'>
                                            <label>预约人数</label>
                                            <input class="form-control" id="Count" placeholder="预约人数">
                                        </div>

                                        <button type="submit" id="btnSubmit" class="btn btn-danger">提交</button>
                                        @*<button type="reset" class="btn btn-default">Reset Button</button>*@
                                    </form>
                                </div>
                                <!-- /.col-lg-6 (nested) -->
                                <!-- /.col-lg-6 (nested) -->
                            </div>
                            <!-- /.row (nested) -->
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /. ROW  -->
                <footer><p>Copyright &copy; 2020.张掖大地信息科技有限责任公司 All rights reserved.</p></footer>
            </div>
            <!-- /. PAGE INNER  -->
        </div>
        <!-- /. WRAPPER  -->
        <!-- JS Scripts-->
        <!-- jQuery Js -->
        <!-- Metis Menu Js -->
        <script src="~/assets/js/jquery.metisMenu.js"></script>
        <!-- Morris Chart Js -->
        <!--<script src="~/assets/js/morris/raphael-2.1.0.min.js"></script>
        <script src="~/assets/js/morris/morris.js"></script>-->
        @*<script src="~/assets/js/easypiechart.js"></script>
            <script src="~/assets/js/easypiechart-data.js"></script>*@


        <!-- Custom Js -->
        @*<script src="~/assets/js/custom-scripts.js"></script>*@

    </div>

    <script type="text/javascript">
        var opts1 = {//example 1 opts
            'targetId': 'date1',//时间写入对象的id
            'triggerId': ['date1', 'dateBtn1'],//触发事件的对象id
            'alignId': 'datesWrap1',//日历对齐对象
            'format': '-',//时间格式 默认'YYYY-MM-DD HH:MM:SS'
            'min': '2014-09-20 10:00:00',//最大时间
            'max': '2014-10-30 10:00:00'//最小时间
        },
            opts2 = {//example 2 opts
                'targetId': 'date2',
                'triggerId': ['dateBtn2'],
                'alignId': 'datesWrap2',
                'format': '-',//时间格式 默认'YYYY-MM-DD HH:MM:SS'
                'min': '2014-09-20 10:00:00',//最大时间
                'max': '2014-10-30 10:00:00'//最小时间
            },
            opts3 = {
                'targetId': 'startTime',//时间写入对象的id
                'min': '1900-01-01 10:00:00',//最大时间
                'max': '2099-12-12 10:00:00'//最小时间
            }, opts4 = {
                'targetId': 'endTime',//时间写入对象的id
                'min': '1900-01-01 10:00:00',//最大时间
                'max': '2099-12-12 10:00:00'//最小时间
            };

        //example 1:
        //xvDate(opts1);
        //xvDate(opts2);
        xvDate(opts3);
        xvDate(opts4);

        /*seajs.config({
            alias: {//别名配置
                'main': '/xvCalendar/src/js/main.js'
            }
        });
        seajs.use(['main']);
*/
    </script>
    <script type="text/javascript">
        $("#btnSubmit").click(function () {
            var projectname = $("#projectName").val();
            var startTime = $("#startTime").val();
            var endTime = $("#endTime").val();
            var count = $("#Count").val();
            var url = '@Url.Action("Submit","Manage")';
            var param = {
                projectname: projectname,
                startTime: startTime,
                endTime: endTime,
                count: count,
            };
            $.post(url, param, function(data) {
                //if (data == "Success") {
                //    alert("添加成功");
                //    window.location.href = "Manage";
                //}
                //else {
                //    alert("添加失败");
                //    window.location.href = "Manage";
                //}
                alert(data);
                window.location.href = "Manage";
            });

        });
    </script>
</body>
</html>
